import { _decorator, Component, Enum, Node } from 'cc';
import { UIID } from '../UIConfigData';
import { uiManager } from '../UIManager';
const { ccclass, property } = _decorator;

@ccclass('UIButtonOpenCom')
export class UIButtonOpenCom extends Component {
    @property({type: Enum(UIID)})
    uiID: UIID = UIID.Login

    start() {
        this.node.on(Node.EventType.TOUCH_END, this._onClick, this);
    }

    private _onClick() {
        uiManager.open(this.uiID, null);
    }
}


